import request from '../utils/request';

export function errandData(query){
    return request({
        url: '/errand/selectAll',
        method: 'get',
        params: query
    });
};
export function batchDelPost(errandIds) {
    return request({
        url: 'errand/batchDelete/' + errandIds,
        method: 'delete'
    })
};

export function deleteErrand(errandid){
    return request({
        url:'/errand/delete/'+errandid,
        method:'delete',
    })
};
export function selectAllList(query) {
    return request({
        url: '/errand/selectAllList',
        method: 'get',
        params: query
    });
};

export function getById(id) {
    return request({
        url: '/errand/getById/'+id,
        method: 'get',
    });
};

export function selectById(id) {
    return request({
        url: '/errand/selectById/'+id,
        method: 'get',
    });
};

export function updateErrand(data) {
    return request({
        url: '/errand/update',
        method: 'put',
        data: data
    })
}

export function addErrand(data) {
    return request({
        url: '/errand/insert',
        method: 'post',
        data: data
    })
}